<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Theme="SkinFile" CodeFile="PerfilAdmin.aspx.cs" Inherits="PerfilAdmin" Title="Mantenimiento - Perfiles" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <asp:UpdatePanel runat="server" id="UpdatePanelPerfil">
    <ContentTemplate>
                    <br />
                    <table width="80%">
                        <tr>
                            <td colspan="3">
                               <asp:Label id="lblTituloPerfil" runat="server" CssClass="titulo"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3"><br /></td>
                        </tr>
                    </table>
                    <div class="divBorderOnly">
                    <table width="80%">
                        <TR>
                                <TD>
                                    <asp:Label id="lblNombre" runat="server" Text="<%$ Resources:Resource,lblPerfilNombre %>" cssclass="label"></asp:Label>&nbsp; 
                                    <asp:TextBox id="txtNombre" MaxLength="100" runat="server" CssClass="textContent" onkeypress="ingresoMayusculas();"></asp:TextBox>&nbsp; 
                                    <asp:Button id="btnBuscar" runat="server" CssClass="boton" Text="<%$ Resources:Resource,btnBuscar %>" OnClick="btnBuscar_Click"></asp:Button>                                    
                                </TD>
                            </TR>
                    </table>
                    </div>
                    <br />
                    <TABLE>
                        <TBODY>                            
                            <TR>
                                <TD>
                                <asp:GridView id="gvPerfil" runat="server" ShowFooter="True" OnRowDeleting="gvPerfil_RowDeleting" OnRowCreated="gvPerfil_RowCreated" OnRowUpdating="gvPerfil_RowUpdating" AllowPaging="True" OnRowEditing="gvPerfil_RowEditing" OnRowDataBound="gvPerfil_RowDataBound" OnRowCommand="gvPerfil_RowCommand" OnRowCancelingEdit="gvPerfil_RowCancelingEdit" CellPadding="2" AutoGenerateColumns="False" PageSize="10" OnPageIndexChanging="gvPerfil_PageIndexChanging">
                                <Columns>
                                    <asp:TemplateField Visible="False">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chk" runat="server" />
                                            <asp:Label ID="lblPerfilId" runat="server" Visible="false" Text='<%# Eval("PerfilId")  %>'></asp:Label>                            
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Left">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtNombre" MaxLength="100" CssClass="textContent" runat="server" Text='<%# Eval("Nombre")  %>' onkeypress="ingresoMayusculas();"></asp:TextBox>                            
                                        </EditItemTemplate>
                                        <HeaderTemplate>
                                            <asp:Label ID="lblNombre" runat="server"></asp:Label>                            
                                        </HeaderTemplate>
                                        <FooterTemplate>
                                            <asp:TextBox width="90pt" ID="txtNombreAdd" MaxLength="100" CssClass="textContent" runat="server" onkeypress="ingresoMayusculas();"></asp:TextBox>                            
                                        </FooterTemplate>                                        
                                        <ItemTemplate>
                                            <asp:Label width="90pt" ID="lblPerfilNombre" runat="server" Text='<%# Eval("Nombre")  %>'></asp:Label>                            
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Left">
                                        <EditItemTemplate>
                                            <asp:TextBox width="300px" height="100px" ID="txtDescripcion" TextMode="MultiLine" CssClass="textContent" runat="server" Text=' <%# Eval("Descripcion")  %>' onkeypress="ingresoMayusculas();"></asp:TextBox>                            
                                        </EditItemTemplate>
                                        <HeaderTemplate>
                                            <asp:Label ID="lblDescripcion" runat="server"></asp:Label>                            
                                        </HeaderTemplate>
                                        <FooterTemplate>
                                            <asp:TextBox width="300px" height="100px" ID="txtDescripcionAdd" TextMode="MultiLine" CssClass="textContent" runat="server" onkeypress="ingresoMayusculas();"></asp:TextBox>                            
                                        </FooterTemplate>                                        
                                        <ItemTemplate>
                                            <%# Eval("Descripcion")  %>                            
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <EditItemTemplate>
								            <asp:LinkButton runat="server" Text="Actualizar" CommandName="Update" ID="lnkUpdate"></asp:LinkButton>&nbsp;
								            <asp:LinkButton runat="server" Text="Cancelar" CommandName="Cancel" ID="lnkCancel"></asp:LinkButton>							
                                        </EditItemTemplate>
                                        <FooterStyle HorizontalAlign="Center" />
                                        <FooterTemplate>
                                            <asp:LinkButton runat="server" Text="Agregar" CommandName="AddItem" ID="lnkAddItem"></asp:LinkButton>&nbsp;
								            <asp:LinkButton runat="server" Text="Cancelar" CommandName="CancelItem" ID="lnkCancelItem" visible="false"></asp:LinkButton>                            
                                        </FooterTemplate>
                                        <ItemTemplate>
                                            <asp:LinkButton runat="server" Text="Editar" ID="lnkEdit" CommandName="Edit"></asp:LinkButton>
                                            <asp:LinkButton OnClientClick="return confirm('Esta seguro que desea eliminar este item?');" ID="lnkDelete" runat="server" CommandName="Delete" Text="Eliminar" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                            </Columns>
                            <RowStyle CssClass="gridItem" HorizontalAlign="Center"></RowStyle>
                            <EditRowStyle CssClass="gridItem" HorizontalAlign="Center"></EditRowStyle>
                            <PagerStyle CssClass="gridItem"></PagerStyle>
                            <HeaderStyle CssClass="gridHead" HorizontalAlign="Center"></HeaderStyle>
                            <AlternatingRowStyle CssClass="gridItem"></AlternatingRowStyle>
                    </asp:GridView> </TD></TR><TR><TD><BR /></TD></TR><TR><TD>
                    <asp:Button id="btnAgregar" onclick="btnAgregar_Click" runat="server" CssClass="boton" visible="false"></asp:Button>&nbsp;
                    <asp:Button id="btnEliminar" onclick="btnEliminar_Click" runat="server" CssClass="boton" visible="false"></asp:Button>&nbsp;
                    <asp:Button id="btoSalir" onclick="btnSalir_Click" runat="server" CssClass="boton" Text="Cerrar"></asp:Button> 
                    </TD></TR></TBODY></TABLE>
</ContentTemplate>
        </asp:UpdatePanel> 
</asp:Content>

